Rebamipide, which means a carbostyril compound (chemical name: 2-(4-chlorobenzoylamino)-3-[2(1H)-quinolon-4-yl]propionic acid) of the following formula (1), is a medicament that has a potent effect on the treatment of gastric ulcer, acute gastritis, or gastric mucosa lesion affected in acute exacerbation of chronic gastritis.

As an example of the process for preparing rebamipide, a process shown in the following scheme 1 is known (JP-A-60-19767). The process is illustrated as follows:
That is,
bromomethyl carbostyril (2) is reacted with diethylacetamide malonate (3) in the presence of a base such as sodium ethoxide to give carbostyril malonate compound (4);
the compound (4) is hydrolyzed and decarboxylated in the presence of a mineral acid such as hydrochloric acid to prepare carbostyril amino acid compound (5); and then
the compound (5) is acylated with 4-chlorobenzoyl chloride (6) to prepare the desired rebamipide of the formula (1).

The above starting material, bromomethyl carbostyril (2), can be prepared, for example, as shown in the following scheme 2:
That is,
acetoacetanilide (7) is brominated with bromine, N-bromosuccinimide, or the like to give a compound of the formula (8); and then
the compound (8) is ring-closed with a condensing agent such as concentrated sulfuric acid to prepare the compound (2). However, the product (2) contains 6-bromocarbostyril compound of the following formula (9) as an impurity, which is one of by-products produced from the above bromination.

On transforming the bromomethyl carbostyril (2) to rebamipide (1) according to the above scheme 1, the above impurity contained in the bromomethyl carbostyril (2), i.e. 6-bromocarbostyril compound (9), is reacted in the same behavior of the bromomethyl carbostyril (2), as shown in the following scheme 3, to give the corresponding 6-bromo compound of the formula (12) via the corresponding compounds of the formula (10) and formula (11), and thereby the impurity (12) is contained in the desired rebamipide (1).

It is possible to partly decrease the amount of the produced impurity 6-bromocarbostyril compound (9) by controlling the condition of the bromination shown in the above-mentioned scheme 2, for example, engaging an equimolar or less amount of used bromine to the amount of the acetoacetanilide (7) and making the reaction temperature 50° C. or less, however, it might be limitative to decrease the preparation of the 6-bromocarbostyril compound (9) without significantly decreasing the yield of the desired bromocarbostyril (2) by only controlling the reaction condition.
Accordingly, it is necessary to remove such contaminated impurity 6-bromo compound (12) when the desired rebamipide (1) is used as a medicament, however, it is difficult to prepare rebamipide with high purity and high yield since such removal is really difficult, and the impurity is not fully removed by recrystallizing or washing with solvent, and additionally it is accompanied with loss of the desired rebamipide by the operation. From such viewpoint, it started to study the removal of the 6-bromocarbostyril compound (9) contained in the bromomethyl carbostyril (2).
Thus, the method of removing the contaminated impurity 6-bromocarbostyril compound (9) from the bromomethyl carbostyril (2) includes, for example, recrystallizing from various solvents and dispersing/washing with various solvents; however, such methods do not provide any sufficient effect of the removal. Also, for example, using N,N-dimethyl formamide, N,N-dimethyl acetamide, 1-methyl-2-pyrrolidone and the like, a certain effect of the removal will be observed; however, in this case the bromomethyl carbostyril (2) will be lost a lot due to transference into the filtrate. Accordingly, such method is also not useful in fact.
Additionally, if the derivatives of the contaminated impurity 6-bromo compound is tried to be removed as the following steps: that is, removing the corresponding 6-bromo compound (10) from carbostyril malonate compound (4) in the above-mentioned scheme 1, or removing the corresponding 6-bromo compound (11) from the carbostyril amino acid compound (5) in the same scheme, the same problem will arise.